package localhost.services.DeptsData;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;

/**
 * @program: spms
 * @description: 从OA获取费用承担部门信息
 * @author: Wayne Wu
 * @create: 2021-04-20 10:06
 **/

public class getCostBearingDept {

    public static void main( String[] args ) {
        try {
            /** 从 OA 获取 费用承担部门 码值信息数据，写入数据库。用于工厂请购单填写。 */
            DeptsDataPortTypeProxy deptsDataPortTypeProxy = new DeptsDataPortTypeProxy();
            Object obj = JSON.toJSON(deptsDataPortTypeProxy.getDepts());
            //System.out.println(obj);
            JSONArray array = JSONArray.parseArray(obj.toString());
//            System.out.println(array);
//            for (int i = 0; i < array.size(); i++){
//                System.out.println(i + "    " + array.getJSONObject(i));
//            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
